/**
 * @file 更精细的数据权限
 * @date 2025/11/15 20:58:38
 * @author lyqjob@yeah.net
 */

import {  useState  } from 'react';
import { Tabs } from 'antd';
import PermissionTree from './PermissionTree';
// 新的数据权限组件结构
const AdvancedDataPermission = () => {
    const [activeTab, setActiveTab] = useState('read'); // read/write/manage
    
    return (
        <Tabs 
            activeKey={activeTab} 
            onChange={setActiveTab}
            items={[
                {
                    key: 'read',
                    label: '可读权限',
                    children: <PermissionTree permissionType={1} />
                },
                {
                    key: 'write', 
                    label: '可写权限',
                    children: <PermissionTree permissionType={2} />
                },
                {
                    key: 'manage',
                    label: '管理权限', 
                    children: <PermissionTree permissionType={3} />
                }
            ]}
        />
    );
};

export default AdvancedDataPermission;